
function switchData(){
    var listModule = google.mashups.getObjectById('myList');
    listModule.setData('http://pipes.yahoo.com/pipes/pipe.run?_id=tg0Hsc033BGJ7ysVJhOy0Q&_render=rss&q='+document.getElementById('query_string').value);
}

/* Function to suppress enter key */
function handleEnter(event) {
    event = event || window.event;
    var key = event.which || event.keyCode;
    var target = event.currentTarget || event.srcElement;
    if (key==13) {
        event.cancelBubble = true;
        if (event.stopPropogation) event.stopPropogation();
        event.returnValue = false;
        switchData();
        return false;
    }
    return true;
}

function handleListSelect() {
    var lat = new GPath("geo:lat");
    var myList = google.mashups.getObjectById('myList');
    var feed = myList.getData();
    var entry = myList.getSelectedEntry();
    var value = lat.getValue(entry);
    return !!value;
}
